/*
2021-7-16
https://www.acwing.com/problem/content/3771/ 
*/

#include<iostream>

using namespace std;

int main()
{
    int n;
    string s;
    cin>>n>>s;
    int res=0,cnt=0;
    
    for(int i=0;i<n;i++)
    {
        if(s[i]=='x')
        {
            if(++cnt>=3)
                res++;
        }
        else cnt=0;
    }
    
    cout<<res<<endl;
    
    return 0;
}
